#!/bin/bash -il
 docker stop function_distribute
 docker rm function_distribute
echo ---------------Building Docker Image...------------------
 docker build -t function_distribute:1.0 .
 # 删除临时创建的镜像
docker rmi $(docker images -f "dangling=true" -q)
echo ---------------Launching Container...------------------
 docker run --ulimit core=0 --log-opt max-size=50m --log-opt max-file=3 --name function_distribute -d -v /etc/localtime:/etc/localtime --privileged=true --restart=always function_distribute:1.0

 echo "function_distribute Finish!"